# Contributor: Aleks Bunin <alpinelinux@compuix.com>
# Maintainer: Aleks Bunin <alpinelinux@compuix.com>
pkgname=antibody
pkgver=6.1.1
pkgrel=20
pkgdesc="The fastest zsh shell plugin manager."
url="https://github.com/getantibody/antibody"
license="MIT"
arch="all"
depends="git zsh"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/getantibody/antibody/archive/v$pkgver.tar.gz"
options="!check" # uses removed github api

export GOFLAGS="$GOFLAGS -modcacherw"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -o antibody -ldflags  "-X main.version=$pkgver" -trimpath
}

check() {
	go test -v -cover ./...
}

package() {
	install -sD -m 755 antibody "$pkgdir"/usr/bin/antibody
}

sha512sums="
0a436227d195b1e68be03d62d0f7fab0f10c4434df10e047468809a6dcf330623c54ddf4e52c459d7b816a3be977e62c6aba58408881f9a45583456e37614b04  antibody-6.1.1.tar.gz
"
